The latter is proper. The former is now "acceptable", but ONLY because even grammar nazis are being forced to judge this idiocracy's Enlish on a sliding scale.
which iscorrect, if the dog was asleep he was quiet, or if the dog were asleep he was quiet,